using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace LPV_POS.manhinh
{
    public partial class mh_grid_combobox : DevExpress.XtraEditors.XtraForm
    {
      // private DataSet ds;
        private DataTable tb;
        private thuvien tv;
        string[] s;
        object[] o;
        private DataTable showdataon_gridnhomchu()
        {
            s = new string[] { "@flag", "@choose" };
            o = new object[] { 1, 0 };
            tv = new thuvien();
            tb = tv.SP_SelectDataTable("sp_mh_select_hanghh", s, o);
            return tb;
        }
        private DataTable showdataon_gridnhomhang()
        {
            s = new string[] { "@flag", "@choose" };
            o = new object[] { 1, 2 };
            tv = new thuvien();
            tb = tv.SP_SelectDataTable("sp_mh_select_hanghh", s, o);
            return tb;
        }
        public mh_grid_combobox()
        {
            InitializeComponent();
        
        }

        private void mh_grid_combobox_Load(object sender, EventArgs e)
        {
            thuvien.Chuoi_CSDL = @"Data Source=RAD03\SQLEXPRESS;Initial Catalog=LPV_POS;Integrated Security=True";
            luoi_nhomchu.MainView = grid_nhomchu;
            luoi_nhomchu.DataSource = showdataon_gridnhomchu();

            lookup_nhomhang.DataSource = showdataon_gridnhomhang();
        }

        private void simpleButton1_Click(object sender, EventArgs e)
        {
            string ten = grid_nhomchu.GetRowCellValue(grid_nhomchu.FocusedRowHandle, col_nhomhang).ToString();
            LPV_POS.Module.MessageBox_LPV.Show(ten);
        }

    
    }
}